package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 用户实体bean
 */
@Data
@NoArgsConstructor
@TableName("t_user")
public class UserBean {
    @TableId(value = "pk_userId",type = IdType.AUTO)
    private Integer id;
    @TableField("u_name")
    private String name;
    @TableField("u_pwd")
    private String pwd;
    @TableField("u_salt")
    private String salt;
    @TableField(exist = false)
    private List<RoleBean> roleList;
    @TableField(exist = false)
    private List<GradeBean> gradeList;

    public UserBean(String name, String pwd) {
        this.name = name;
        this.pwd = pwd;
    }
}
